var express = require('express');
const {selectDepartment, addDepartment, modifyDepartment, deleteDepartment} = require("../services/department");
var router = express.Router();



router.get('/departments',(req,res)=>{
    selectDepartment(res)
})
 router.post('/departments',(req,res)=>{
     addDepartment(req.body,res)
 })
router.put('/departments',(req,res)=>{
    modifyDepartment(req.body,res)
})

router.delete('/departments',(req,res)=>{
    // console.log(req,'参数')
    deleteDepartment(req.query,res)
})


module.exports = router
